A20 - LCS
https://atcoder.jp/contests/tessoku-book/tasks/tessoku_book_t
提出
code: python
s = input()
t = input()
# dp
i
j
:=
解答
code: python
s = input()
t = input()
dp = [
0
* (len(t) + 1) for i in range(len(s) + 1)]
for i in range(len(s)):
for j in range(len(t)):
if s
i
== t
j
:
dp
i+1
j+1
= max(dp
i
j+1
, dp
i+1
j
, dp
i
j
+1)
else:
dp
i+1
j+1
= max(dp
i
j+1
, dp
i+1
j
)
print(dp
len(s)
len(t)
)